Skip to main content

Get Tenant Keys

GET /api/v1/tenants/{tenantId}/keys

Description

Retrieve keys associated with a specific tenant.

Path Parameters

NameTypeDescription
tenantIdstringThe ID of the tenant (path)

Query Parameters

NameTypeDescription
keyByTypesstringAllowed fields separated by comma: TENANT_PRODUCT,TENANT_SERVICE (query)
keyByStatusesstringAllowed fields separated by comma: ACTIVE,DISABLED,REVOKED,REFRESHED,EXPIRED (query)
orderstringAvailable values: ASC, DESC (query)
pagestringPage number (query)
limitstringNumber of items per page (query)

Example

GET /api/v1/tenants/{tenantId}/keys?keyByTypes=TENANT_PRODUCT,TENANT_SERVICE&keyByStatuses=ACTIVE,DISABLED&order=ASC&page=1&limit=10

Response Code: 200 - OK

Description

Request was successful.

Response Fields

FieldTypeDescription
statusbooleanIndicates if the operation was successful
dataarrayArray of keys associated with the tenant
pageintegerCurrent page number
limitintegerNumber of items per page
totalintegerTotal number of items

Example

{
"status": true,
"data": [
{
"keyId": "key123",
"type": "TENANT_PRODUCT",
"status": "ACTIVE",
"createdAt": "2023-01-01T00:00:00Z"
},
{
"keyId": "key456",
"type": "TENANT_SERVICE",
"status": "DISABLED",
"createdAt": "2023-01-01T00:00:00Z"
}
],
"page": 1,
"limit": 10,
"total": 2
}

Headers

Content-TypeValue
apiKey{{apiKey}}

🔑 Authentication bearer

ParamValueType
token{{accessCode}}string

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request GET \ 
--url /api/v1/tenants/{tenantId}/keys \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!